home *** CD-ROM | disk | FTP | other *** search
- on askThisCEXT message, btn1, btn2, btn3, cmd1, cmd2, cmd3
- global alertWin, gDefaultButton
- tell alertWin
- put EMPTY into field "AskCmd1"
- end tell
- tell alertWin
- put EMPTY into field "AskCmd2"
- end tell
- tell alertWin
- put EMPTY into field "AskCmd3"
- end tell
- if not voidp(cmd1) then
- put cmd1 into field "AskCmd1"
- end if
- if not voidp(cmd2) then
- put cmd2 into field "AskCmd2"
- end if
- if not voidp(cmd3) then
- put cmd3 into field "AskCmd3"
- end if
- if not voidp(message) then
- put message into field "AskMessage"
- end if
- updateStage()
- set msgV to the height of member "AskMessage"
- set winV to 7 + msgV + 45
- if winV < 80 then
- set winV to 80
- end if
- set x to 400
- set y to winV
- tell the stage
- set the rect of alertWin to getCenteredRect(x, y)
- end tell
- repeat with p = 1 to 10
- puppetSprite(p, 0)
- end repeat
- updateStage()
- go("AskThisC")
- repeat with m in [2, 4, 6]
- set the visible of sprite m to 1
- puppetSprite(m, 1)
- set the locV of sprite m to winV - 18
- updateStage()
- end repeat
- repeat with m in [3, 5, 7]
- set the visible of sprite m to 0
- puppetSprite(m, 1)
- set the locV of sprite m to winV - 18
- updateStage()
- end repeat
- repeat with m = 8 to 10
- set the visible of sprite m to 1
- puppetSprite(m, 1)
- set the locV of sprite m to winV - 26
- updateStage()
- end repeat
- set gDefaultButton to "1"
- set the memberNum of sprite 2 to the number of member "lrg def btn"
- set the memberNum of sprite 4 to the number of member "sml btn"
- set the memberNum of sprite 6 to the number of member "sml btn"
- updateStage()
- if not voidp(btn1) then
- if the number of chars in btn1 > 16 then
- repeat while the number of chars in btn1 > 15
- delete char -30000 of btn1
- end repeat
- set theLastChar to the number of chars in btn1
- put "..." after char theLastChar of btn1
- end if
- end if
- if voidp(btn2) = 0 then
- if the number of chars in btn2 > 12 then
- repeat while the number of chars in btn2 > 11
- delete char -30000 of btn2
- end repeat
- set theLastChar to the number of chars in btn2
- put "..." after char theLastChar of btn2
- end if
- end if
- if voidp(btn3) = 0 then
- if the number of chars in btn3 > 12 then
- repeat while the number of chars in btn3 > 11
- delete char -30000 of btn3
- end repeat
- set theLastChar to the number of chars in btn3
- put "..." after char theLastChar of btn3
- end if
- end if
- if voidp(btn1) or (btn1 = EMPTY) then
- set btn1 to "OK"
- end if
- set the text of member "AskBtn1" to btn1
- updateStage()
- if voidp(btn2) or (btn2 = EMPTY) then
- repeat with i in [4, 5, 9]
- set the visible of sprite i to 0
- end repeat
- else
- set the text of member "AskBtn2" to btn2
- end if
- updateStage()
- if voidp(btn3) or (btn3 = EMPTY) then
- repeat with i in [6, 7, 10]
- set the visible of sprite i to 0
- end repeat
- else
- set the text of member "AskBtn3" to btn3
- end if
- updateStage()
- tell the stage
- playAsk()
- end tell
- updateStage()
- if the machineType = 256 then
- tell the stage
- set the windowType of alertWin to 1
- end tell
- else
- tell the stage
- set the windowType of alertWin to 1
- end tell
- end if
- tell the stage
- set the modal of alertWin to 1
- end tell
- tell the stage
- open(alertWin)
- end tell
- tell the stage
- return EMPTY
- end tell
- end
-